@echo off

set svcName=helpsrv
if "%~1"=="" (
    echo Error: should be "dockerPush.bat v?.?.?"
    exit /b
)

set image=%svcName%:%~1
echo %image%

docker images -q %image%
if %errorlevel% equ 0 (
    echo Image exists
) else (
    echo Image does not exist
    exit /b
)

docker tag %image% registry.cn-hangzhou.aliyuncs.com/wiztop/%image%
docker push registry.cn-hangzhou.aliyuncs.com/wiztop/%image%